package com.shopx.task.job;

import com.shopx.cm.service.ICmMaterialService;
import com.shopx.cm.service.ICmSaleDetailService;
import com.shopx.cm.service.ICmSendService;
import com.shopx.task.AbstractQuatazJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class SyncMaterialSaleJob  extends AbstractQuatazJob {
    @Resource
    private ICmSaleDetailService cmSaleDetailService;

    @Override
    public void execute() {
        log.info("SyncMaterialSaleJob.begin");
        try{
            cmSaleDetailService.syncSaleDt();
        }catch (Exception e){
            log.error("SyncMaterialSaleJob.error",e);
        }
        log.info("SyncMaterialSaleJob.end");
    }
}
